package com.ctgu.fcftsystem.service;

import com.ctgu.fcftsystem.dao.ExpenditureDao;
import com.ctgu.fcftsystem.pojo.Expenditure;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.List;
@Service
@Transactional
public class ExpenditureServiceImpl implements ExpenditureService {
    @Autowired
    private ExpenditureDao expenditureDao;

    /**
     * 根据时间对支出记录进行查询
     * @param date
     * @return
     */
    @Override
    public List<Expenditure> searchExpenditureByDate(Date date) {
        return expenditureDao.searchExpenditureByDate(date);
    }

    /**
     * 根据类型对支出记录进行查询
     * @param expenditureType
     * @return
     */
    @Override
    public List<Expenditure> searchExpenditureByType(Integer expenditureType) {
        return expenditureDao.searchExpenditureByType(expenditureType);
    }
}
